home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 7.3 KB | 256 lines | [TEXT/MPS ] |
- ;
- ; File: StandardFile.a
- ;
- ; Contains: Standard File package Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
- __STANDARDFILE__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
- include 'Dialogs.a'
- ENDIF
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
- ; The interfaces for other managers depend on these structs.
- SFReply RECORD 0
- good ds.b 1 ; offset: $0 (0)
- copy ds.b 1 ; offset: $1 (1)
- fType ds.l 1 ; offset: $2 (2)
- vRefNum ds.w 1 ; offset: $6 (6)
- version ds.w 1 ; offset: $8 (8)
- fName ds Str63 ; offset: $A (10)
- sizeof EQU * ; size: $4A (74)
- ENDR
- StandardFileReply RECORD 0
- sfGood ds.b 1 ; offset: $0 (0)
- sfReplacing ds.b 1 ; offset: $1 (1)
- sfType ds.l 1 ; offset: $2 (2)
- sfFile ds FSSpec ; offset: $6 (6)
- sfScript ds.w 1 ; offset: $4C (76)
- sfFlags ds.w 1 ; offset: $4E (78)
- sfIsFolder ds.b 1 ; offset: $50 (80)
- sfIsVolume ds.b 1 ; offset: $51 (81)
- sfReserved1 ds.l 1 ; offset: $52 (82)
- sfReserved2 ds.w 1 ; offset: $56 (86)
- sizeof EQU * ; size: $58 (88)
- ENDR
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; * Note to developers targeting for system versions later than System 7.x.
- ; *
- ; * After System 7.x, the routines in this file will become obsolete!
- ; *
- ; * For software targeted to later system versions, do not include this file.
- ; * Instead, include Navigation and use its routines. StandardFile routines will
- ; * be implemented only for backward compatibility with System 7.x software.
- ; *
- ;
-
- ; resource IDs and item offsets of pre-7.0 dialogs
- putDlgID EQU -3999
- putSave EQU 1
- putCancel EQU 2
- putEject EQU 5
- putDrive EQU 6
- putName EQU 7
- getDlgID EQU -4000
- getOpen EQU 1
- getCancel EQU 3
- getEject EQU 5
- getDrive EQU 6
- getNmList EQU 7
- getScroll EQU 8 ; resource IDs and item offsets of 7.0 dialogs
- sfPutDialogID EQU -6043
- sfGetDialogID EQU -6042
- sfItemOpenButton EQU 1
- sfItemCancelButton EQU 2
- sfItemBalloonHelp EQU 3
- sfItemVolumeUser EQU 4
- sfItemEjectButton EQU 5
-
- sfItemDesktopButton EQU 6
- sfItemFileListUser EQU 7
- sfItemPopUpMenuUser EQU 8
- sfItemDividerLinePict EQU 9
- sfItemFileNameTextEdit EQU 10
- sfItemPromptStaticText EQU 11
- sfItemNewFolderUser EQU 12 ; pseudo-item hits for use in DlgHook
- sfHookFirstCall EQU -1
- sfHookCharOffset EQU $1000
- sfHookNullEvent EQU 100
- sfHookRebuildList EQU 101
- sfHookFolderPopUp EQU 102
- sfHookOpenFolder EQU 103 ; the following are only in system 7.0+
- sfHookOpenAlias EQU 104
- sfHookGoToDesktop EQU 105
- sfHookGoToAliasTarget EQU 106
- sfHookGoToParent EQU 107
- sfHookGoToNextDrive EQU 108
- sfHookGoToPrevDrive EQU 109
- sfHookChangeSelection EQU 110
-
- sfHookSetActiveOffset EQU 200
- sfHookLastCall EQU -2
- ;
- ; the refcon field of the dialog record during a
- ; modalfilter or dialoghook contains one of the following
- ;
-
- sfMainDialogRefCon EQU 'stdf'
- sfNewFolderDialogRefCon EQU 'nfdr'
- sfReplaceDialogRefCon EQU 'rplc'
- sfStatWarnDialogRefCon EQU 'stat'
- sfLockWarnDialogRefCon EQU 'lock'
- sfErrorDialogRefCon EQU 'err '
- ; for CustomXXXFile, ActivationOrderListPtr parameter is a pointer to an array of item numbers
- ; typedef const short * ActivationOrderListPtr
-
- ; the following also include an extra parameter of "your data pointer"
- SFTypeList RECORD 0
- elements ds.l 4
- sizeof EQU * ; size: $10 (16)
- ENDR
-
-
- ;
- ; The GetFile "typeList" parameter type has changed from "SFTypeList" to "ConstSFTypeListPtr".
- ; For C, this will add "const" and make it an in-only parameter.
- ; For Pascal, this will require client code to use the @ operator, but make it easier to specify long lists.
- ;
- ; ConstSFTypeListPtr is a pointer to an array of OSTypes.
- ;
- ; typedef const OSType * ConstSFTypeListPtr
-
- ;
- ; pascal void SFPutFile(Point where, ConstStr255Param prompt, ConstStr255Param origName, DlgHookUPP dlgHook, SFReply *reply)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SFPutFile
- move.w #$0001,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SFPutFile
- ENDIF
-
- ;
- ; pascal void SFGetFile(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SFGetFile
- move.w #$0002,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SFGetFile
- ENDIF
-
- ;
- ; pascal void SFPPutFile(Point where, ConstStr255Param prompt, ConstStr255Param origName, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SFPPutFile
- move.w #$0003,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SFPPutFile
- ENDIF
-
- ;
- ; pascal void SFPGetFile(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SFPGetFile
- move.w #$0004,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SFPGetFile
- ENDIF
-
- ;
- ; pascal void StandardPutFile(ConstStr255Param prompt, ConstStr255Param defaultName, StandardFileReply *reply)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _StandardPutFile
- move.w #$0005,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION StandardPutFile
- ENDIF
-
- ;
- ; pascal void StandardGetFile(FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _StandardGetFile
- move.w #$0006,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION StandardGetFile
- ENDIF
-
- ;
- ; pascal void CustomPutFile(ConstStr255Param prompt, ConstStr255Param defaultName, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activate, void *yourDataPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CustomPutFile
- move.w #$0007,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CustomPutFile
- ENDIF
-
- ;
- ; pascal void CustomGetFile(FileFilterYDUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activate, void *yourDataPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CustomGetFile
- move.w #$0008,-(sp)
- dc.w $A9EA
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CustomGetFile
- ENDIF
-
- ;
- ; pascal OSErr StandardOpenDialog(StandardFileReply *reply)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION StandardOpenDialog
- ENDIF
-
- ENDIF
- ENDIF ; __STANDARDFILE__
-
-